// +build !embfs

package views

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

var dist = "views/dist"

func Static(r *gin.Engine, root string) {
	r.LoadHTMLGlob(dist + "/*.html")
	r.Static(root+"/assets", dist+"/assets")
	r.Static(root+"/resource", dist+"/resource")
	r.StaticFile(root+"/favicon.ico", dist+"/favicon.ico")
	r.GET(root, func(c *gin.Context) {
		c.HTML(http.StatusOK, "index.html", nil)
	})
}
